package main

import "fmt"

type Shaper interface {
	Area() float32
}

type Square struct {
	side float32
}

func (s *Square) Area() float32 {
	return s.side * s.side
}

type Rectangle struct {
	length, width float32
}

func (r Rectangle) Area() float32 {
	return r.length * r.width
}

func main() {
	r := Rectangle{5, 3}
	s := &Square{5}
	shapers := []Shaper{r, s}
	fmt.Println("Looping through shapes for area ...")
	for _, v := range shapers {
		fmt.Printf("Shape details: %v  Area of this shape is: %f \n", v, v.Area())
	}
}
